/*
 * Copyright (c) 2010-2011 Plugger Antonio Begue Ponce. All Rights Reserved.
 *
 * This file is part of Plugger Framework.
 *
 *  Plugger Framework is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License version 3 as published by
 *  the Free Software Foundation.
 *
 *  Plugger Framework is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with Plugger Framework.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.plugger.ui.base;

import java.awt.Component;
import javax.swing.JMenuBar;

/**
 * Definition for a layout controller.
 *
 * @author "Antonio Begue"
 * @version $Revision: 1.0 $
 */
public interface ILayoutViewModel {
    /**
     * Initialize the controller.
     */
    void startUp();

    /**
     * Close the application, terminate the program.
     */
    void shutDown();

    /**
     * Set a control inside the layoutView.
     * @param control The ui component to be inserted.
     */
    void setControl(Component control);

    /**
     * An overload method to set a control in x-y position.
     * @param control The ui component to be inserted.
     * @param top The top most position of the control.
     * @param left The left most position of the control.
     */
    void setControl(Component control, int top, int left);

    /**
     * Sets the MenuBar for the layoutView.
     * @param menu The MenuBar Object to set.
     */
    void setMenu(JMenuBar menu);

    /**
     * Returns the LayoutView of this controller.
     * @return An ILayoutView object.
     */
    ILayoutView getLayoutView();
}
